﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Globalization;
using System.Threading;

namespace Global1
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected override void InitializeCulture()
        {
            if (Request.Form["ListBox1"] != null)
            {
                string selectedLanguage = Request.Form["ListBox1"];
                UICulture = selectedLanguage;
                Culture = selectedLanguage;
            
                Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedLanguage);
                Thread.CurrentThread.CurrentUICulture = new CultureInfo(selectedLanguage);
        }

                     
              
            base.InitializeCulture();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
           
            

            
        }

        protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(this.ListBox1.SelectedValue);
            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(this.ListBox1.SelectedValue);
             
        }
    }
}
